package consts

// 卡密状态常量
const (
	LicenseKeyStatusActive   = 1 // 激活使用中
	LicenseKeyStatusPending  = 2 // 待激活/待付款
	LicenseKeyStatusExpired  = 3 // 已过期
	LicenseKeyStatusRefunded = 4 // 已退款
)

// 卡密操作类型常量
const (
	LicenseKeyActionActivate   = "activate"   // 激活卡密
	LicenseKeyActionRenew      = "renew"      // 续期
	LicenseKeyActionDeactivate = "deactivate" // 停用
	LicenseKeyActionExpire     = "expire"     // 过期（系统触发）
	LicenseKeyActionRefund     = "refund"     // 退款
	LicenseKeyActionCreate     = "create"     // 创建卡密
	LicenseKeyActionDelete     = "delete"     // 删除卡密
	LicenseKeyActionUpdate     = "update"     // 更新卡密信息
	LicenseKeyActionTransfer   = "transfer"   // 转移卡密所有权
)

// 卡密错误信息
const (
	ErrLicenseKeyNotFound       = "卡密不存在"
	ErrLicenseKeyInvalid        = "无效的卡密"
	ErrLicenseKeyAlreadyUsed    = "卡密已被使用"
	ErrLicenseKeyExpired        = "卡密已过期"
	ErrLicenseKeyInactive       = "卡密已停用"
	ErrLicenseKeyActivated      = "卡密已激活"
	ErrLicenseKeyCreateFailed   = "创建卡密失败"
	ErrLicenseKeyUpdateFailed   = "更新卡密失败"
	ErrLicenseKeyDeleteFailed   = "删除卡密失败"
	ErrLicenseKeyActivateFailed = "激活卡密失败"
	ErrLicenseKeyRefundFailed   = "卡密退款申请失败"
)
